import { createStore } from "vuex";
import user from "./user";
import goods from "./goods";
import cart from "./cart";
import deliver from "./deliver";
import order from "./order";
import coupon from "./coupon";
import subject from "./subject";
import system from "./system";
import supplier from "./supplier";

const store = createStore({
  // 为了不和页面或组件的data中的造成混淆，state中的变量前面建议加上$符号
  state: {
    isFromGlobal: false, // 是否来自全球食品饮料论坛公众号
  },

  modules: {
    user,
    goods,
    cart,
    deliver,
    order,
    coupon,
    subject,
    system,
    supplier,
  },
});

export default store;
